import Vue from 'vue'
import Router from 'vue-router'
import Home from '../views/layout/Home.vue'
import refresh from '../views/layout/refresh.vue'
//库存管理
import kucun from '../views/baoguo/kucun.vue'
import kucunDetail from '../views/baoguo/kucun-detail.vue'
import jijian from '../views/baoguo/jijian.vue'
import jijianDetail from '../views/baoguo/jijian-detail.vue'
import jijianAdd from '../views/baoguo/jijian-add.vue'
import jijianEdit from '../views/baoguo/jijian-edit.vue'
//站点管理
import operateSet from '../views/zhandian/operateSet.vue'
import expressCompany from '../views/zhandian/expressCompany.vue'
import voucherCenter from '../views/zhandian/voucherCenter.vue'
import blackList from '../views/zhandian/blackList.vue'
import siteInfo from '../views/zhandian/siteInfo.vue'
import shortMessageLog from '../views/zhandian/shortMessageLog.vue'

//登录
import login from '../views/login/login'

Vue.use(Router)

export default new Router({
	//	mode: 'history',
	routes: [{
			path: '/',
			component: Home,
			name: '首页',
			children: [{
				path: '/',
				component: refresh,
				name: '首页'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'kucun',
				component: kucun,
				name: '库存管理'
			}]
		}, {
			path: '/',
			component: Home,
			name: '库存管理',
			children: [{
				path: 'kucundetail/:id',
				component: kucunDetail,
				name: '库存详情'
			}]
		}, {
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'jijian',
				component: jijian,
				name: '寄件管理'
			}]
		}, {
			path: '/',
			component: Home,
			name: '寄件管理',
			children: [{
				path: 'jijiandetail',
				component: jijianDetail,
				name: '寄件详情'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'jijianadd',
				component: jijianAdd,
				name: '新增寄件'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'jijianedit',
				component: jijianEdit,
				name: '修改寄件'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'operateset',
				component: operateSet,
				name: '操作设置'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'expresscompany',
				component: expressCompany,
				name: '快递公司统计'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'vouchercenter',
				component: voucherCenter,
				name: '充值中心'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'blacklist',
				component: blackList,
				name: '黑名单'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'siteinfo',
				component: siteInfo,
				name: '站点信息'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'shortmessagelog',
				component: shortMessageLog,
				name: '短信记录'
			}]
		},
		{
			path: '/login',
			component: login,
			name: '登录'
		}
	]
})